Field of the Invention
The present invention relates to a communication apparatus, a method of controlling a communication apparatus, and a storage medium.
Description of the Related Art
In recent years, in a communication apparatus as typified by a smart phone, a tethering function in which the smart phone itself, by operating as an access point (hereinafter, an AP), functions as a modem for another communication apparatus, is widely supported.
If the tethering function of the smart phone is used, it is possible, even for a device that only has a wireless LAN communication function, to use public network communication of the smart phone to communicate with an external server.
Japanese Patent Laid-Open No. 2010-177947 discloses a technique in which, if a smart phone is caused to approach a printer, the printer transmits identification data about wireless LAN communication to the smart phone by Bluetooth (registered trademark), and the identification data is used for both parties to perform wireless LAN communication.
In the Near Field Communication (hereinafter, NFC) Forum, a protocol in which a handover from NFC to a different wireless communication method such as wireless LAN or Bluetooth is being standardized.
In a conventional technique in which a smart phone and a printer perform a handover by an NFC touch and perform wireless LAN communication, a case in which the smart phone connects as an AP and the printer connects as a station (hereinafter, STA) is considered.
There is a necessity for the printer to connect as the STA to the smart phone, but there is a possibility that the printer is already performing wireless LAN communication as an AP of another communication apparatus. In such a case, the printer cannot connect to the AP of the smart phone in a state that maintains the wireless LAN communication with the other communication apparatus. To avoid this, a method in which the smart phone is caused to operate in advance as the AP and wait for a connection by the printer has been considered.
However, because the smart phone does not know when the printer will connect, there is a need for it to continuously operate as the AP, and power is significantly consumed. In addition, because the printer cannot determine whether the smart phone is operating as the AP, it is possible that the printer is performing unnecessary connection processing. Correspondingly, power or wireless resources are consumed unnecessarily.
The present invention was conceived in view of the above described problems, and provides a technique of reducing unnecessary connection processing between communication apparatuses.